// Copyright 2025 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by sidekick. DO NOT EDIT.

/// A dyn-compatible, crate-private version of [super::LivestreamService].
#[async_trait::async_trait]
pub trait LivestreamService: std::fmt::Debug + Send + Sync {
    async fn create_channel(
        &self,
        req: crate::model::CreateChannelRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>>;

    async fn list_channels(
        &self,
        req: crate::model::ListChannelsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListChannelsResponse>>;

    async fn get_channel(
        &self,
        req: crate::model::GetChannelRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Channel>>;

    async fn delete_channel(
        &self,
        req: crate::model::DeleteChannelRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>>;

    async fn update_channel(
        &self,
        req: crate::model::UpdateChannelRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>>;

    async fn start_channel(
        &self,
        req: crate::model::StartChannelRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>>;

    async fn stop_channel(
        &self,
        req: crate::model::StopChannelRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>>;

    async fn start_distribution(
        &self,
        req: crate::model::StartDistributionRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>>;

    async fn stop_distribution(
        &self,
        req: crate::model::StopDistributionRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>>;

    async fn create_input(
        &self,
        req: crate::model::CreateInputRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>>;

    async fn list_inputs(
        &self,
        req: crate::model::ListInputsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListInputsResponse>>;

    async fn get_input(
        &self,
        req: crate::model::GetInputRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Input>>;

    async fn delete_input(
        &self,
        req: crate::model::DeleteInputRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>>;

    async fn update_input(
        &self,
        req: crate::model::UpdateInputRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>>;

    async fn preview_input(
        &self,
        req: crate::model::PreviewInputRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::PreviewInputResponse>>;

    async fn create_event(
        &self,
        req: crate::model::CreateEventRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Event>>;

    async fn list_events(
        &self,
        req: crate::model::ListEventsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListEventsResponse>>;

    async fn get_event(
        &self,
        req: crate::model::GetEventRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Event>>;

    async fn delete_event(
        &self,
        req: crate::model::DeleteEventRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<()>>;

    async fn list_clips(
        &self,
        req: crate::model::ListClipsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListClipsResponse>>;

    async fn get_clip(
        &self,
        req: crate::model::GetClipRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Clip>>;

    async fn create_clip(
        &self,
        req: crate::model::CreateClipRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>>;

    async fn delete_clip(
        &self,
        req: crate::model::DeleteClipRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>>;

    async fn create_dvr_session(
        &self,
        req: crate::model::CreateDvrSessionRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>>;

    async fn list_dvr_sessions(
        &self,
        req: crate::model::ListDvrSessionsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListDvrSessionsResponse>>;

    async fn get_dvr_session(
        &self,
        req: crate::model::GetDvrSessionRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::DvrSession>>;

    async fn delete_dvr_session(
        &self,
        req: crate::model::DeleteDvrSessionRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>>;

    async fn update_dvr_session(
        &self,
        req: crate::model::UpdateDvrSessionRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>>;

    async fn create_asset(
        &self,
        req: crate::model::CreateAssetRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>>;

    async fn delete_asset(
        &self,
        req: crate::model::DeleteAssetRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>>;

    async fn get_asset(
        &self,
        req: crate::model::GetAssetRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Asset>>;

    async fn list_assets(
        &self,
        req: crate::model::ListAssetsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListAssetsResponse>>;

    async fn get_pool(
        &self,
        req: crate::model::GetPoolRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Pool>>;

    async fn update_pool(
        &self,
        req: crate::model::UpdatePoolRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>>;

    async fn list_locations(
        &self,
        req: location::model::ListLocationsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<location::model::ListLocationsResponse>>;

    async fn get_location(
        &self,
        req: location::model::GetLocationRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<location::model::Location>>;

    async fn list_operations(
        &self,
        req: longrunning::model::ListOperationsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::ListOperationsResponse>>;

    async fn get_operation(
        &self,
        req: longrunning::model::GetOperationRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>>;

    async fn delete_operation(
        &self,
        req: longrunning::model::DeleteOperationRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<()>>;

    async fn cancel_operation(
        &self,
        req: longrunning::model::CancelOperationRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<()>>;

    fn get_polling_error_policy(
        &self,
        options: &gax::options::RequestOptions,
    ) -> std::sync::Arc<dyn gax::polling_error_policy::PollingErrorPolicy>;

    fn get_polling_backoff_policy(
        &self,
        options: &gax::options::RequestOptions,
    ) -> std::sync::Arc<dyn gax::polling_backoff_policy::PollingBackoffPolicy>;
}

/// All implementations of [super::LivestreamService] also implement [LivestreamService].
#[async_trait::async_trait]
impl<T: super::LivestreamService> LivestreamService for T {
    /// Forwards the call to the implementation provided by `T`.
    async fn create_channel(
        &self,
        req: crate::model::CreateChannelRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>> {
        T::create_channel(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn list_channels(
        &self,
        req: crate::model::ListChannelsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListChannelsResponse>> {
        T::list_channels(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_channel(
        &self,
        req: crate::model::GetChannelRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Channel>> {
        T::get_channel(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn delete_channel(
        &self,
        req: crate::model::DeleteChannelRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>> {
        T::delete_channel(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn update_channel(
        &self,
        req: crate::model::UpdateChannelRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>> {
        T::update_channel(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn start_channel(
        &self,
        req: crate::model::StartChannelRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>> {
        T::start_channel(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn stop_channel(
        &self,
        req: crate::model::StopChannelRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>> {
        T::stop_channel(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn start_distribution(
        &self,
        req: crate::model::StartDistributionRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>> {
        T::start_distribution(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn stop_distribution(
        &self,
        req: crate::model::StopDistributionRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>> {
        T::stop_distribution(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn create_input(
        &self,
        req: crate::model::CreateInputRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>> {
        T::create_input(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn list_inputs(
        &self,
        req: crate::model::ListInputsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListInputsResponse>> {
        T::list_inputs(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_input(
        &self,
        req: crate::model::GetInputRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Input>> {
        T::get_input(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn delete_input(
        &self,
        req: crate::model::DeleteInputRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>> {
        T::delete_input(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn update_input(
        &self,
        req: crate::model::UpdateInputRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>> {
        T::update_input(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn preview_input(
        &self,
        req: crate::model::PreviewInputRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::PreviewInputResponse>> {
        T::preview_input(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn create_event(
        &self,
        req: crate::model::CreateEventRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Event>> {
        T::create_event(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn list_events(
        &self,
        req: crate::model::ListEventsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListEventsResponse>> {
        T::list_events(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_event(
        &self,
        req: crate::model::GetEventRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Event>> {
        T::get_event(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn delete_event(
        &self,
        req: crate::model::DeleteEventRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<()>> {
        T::delete_event(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn list_clips(
        &self,
        req: crate::model::ListClipsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListClipsResponse>> {
        T::list_clips(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_clip(
        &self,
        req: crate::model::GetClipRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Clip>> {
        T::get_clip(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn create_clip(
        &self,
        req: crate::model::CreateClipRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>> {
        T::create_clip(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn delete_clip(
        &self,
        req: crate::model::DeleteClipRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>> {
        T::delete_clip(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn create_dvr_session(
        &self,
        req: crate::model::CreateDvrSessionRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>> {
        T::create_dvr_session(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn list_dvr_sessions(
        &self,
        req: crate::model::ListDvrSessionsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListDvrSessionsResponse>> {
        T::list_dvr_sessions(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_dvr_session(
        &self,
        req: crate::model::GetDvrSessionRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::DvrSession>> {
        T::get_dvr_session(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn delete_dvr_session(
        &self,
        req: crate::model::DeleteDvrSessionRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>> {
        T::delete_dvr_session(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn update_dvr_session(
        &self,
        req: crate::model::UpdateDvrSessionRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>> {
        T::update_dvr_session(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn create_asset(
        &self,
        req: crate::model::CreateAssetRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>> {
        T::create_asset(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn delete_asset(
        &self,
        req: crate::model::DeleteAssetRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>> {
        T::delete_asset(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_asset(
        &self,
        req: crate::model::GetAssetRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Asset>> {
        T::get_asset(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn list_assets(
        &self,
        req: crate::model::ListAssetsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListAssetsResponse>> {
        T::list_assets(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_pool(
        &self,
        req: crate::model::GetPoolRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Pool>> {
        T::get_pool(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn update_pool(
        &self,
        req: crate::model::UpdatePoolRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>> {
        T::update_pool(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn list_locations(
        &self,
        req: location::model::ListLocationsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<location::model::ListLocationsResponse>> {
        T::list_locations(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_location(
        &self,
        req: location::model::GetLocationRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<location::model::Location>> {
        T::get_location(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn list_operations(
        &self,
        req: longrunning::model::ListOperationsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::ListOperationsResponse>> {
        T::list_operations(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_operation(
        &self,
        req: longrunning::model::GetOperationRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>> {
        T::get_operation(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn delete_operation(
        &self,
        req: longrunning::model::DeleteOperationRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<()>> {
        T::delete_operation(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn cancel_operation(
        &self,
        req: longrunning::model::CancelOperationRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<()>> {
        T::cancel_operation(self, req, options).await
    }

    fn get_polling_error_policy(
        &self,
        options: &gax::options::RequestOptions,
    ) -> std::sync::Arc<dyn gax::polling_error_policy::PollingErrorPolicy> {
        T::get_polling_error_policy(self, options)
    }

    fn get_polling_backoff_policy(
        &self,
        options: &gax::options::RequestOptions,
    ) -> std::sync::Arc<dyn gax::polling_backoff_policy::PollingBackoffPolicy> {
        T::get_polling_backoff_policy(self, options)
    }
}
